package com.xingkeduo.pojo.enums;


import org.apache.commons.lang.StringUtils;


public class ActivityEnum {
   
	
	//活动标签枚举  页面上用
	public static enum ActivityVoEnum {
    	
		Vertical_Reduction("1","立减"),
		Discount("2","折扣"),
		OnSale("3","特价"),
		LowPeak_Discount("4","低峰优惠");
    	
		private String type;
		private String typeName;
		
		public String getType() {
			return type;
		}
		
		public void setType(String type) {
			this.type = type;
		}

		public String getTypeName() {
			return typeName;
		}

		public void setTypeName(String typeName) {
			this.typeName = typeName;
		}



		private ActivityVoEnum(String type, String typeName) {
			this.type=type;
			this.typeName = typeName;
		}
	}
	
	
	//和marketing项目对应
	public static enum ActivityModeEnum {
    	//0门店活动，1发型师活动
    	UNKNOWN("UNKNOWN","未知",-1),//未知；
    	STORE("STORE","门店活动",2),
    	HAIRDRESSER("HAIRDRESSER","发型师活动",3);
    	
		
		private String statusType;
		private String desc;
		private int code;
		
		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}
		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}
		
		private ActivityModeEnum(String statusType, String desc,int code) {
			this.statusType=statusType;
			this.desc = desc;
			this.code = code;
		}

		public static ActivityModeEnum parse(String statusType) {
			if(StringUtils.isBlank(statusType)) {
				return UNKNOWN;
			}
			for (ActivityModeEnum activityModeEnum : values()) {
				if (statusType.equalsIgnoreCase(activityModeEnum.getStatusType())) {
					return activityModeEnum;
				}
			}
			return UNKNOWN;
		}
		public static ActivityModeEnum parseStatus(int code) {
			for (ActivityModeEnum activityModeEnum : values()) {
				if (code==activityModeEnum.getCode()) {
					return activityModeEnum;
				}
			}
			return UNKNOWN;
		}
	}
	
	//和marketing项目对应
	public static enum ActivityTypeEnum {
    	//活动类型 PAYMENT 支付活动，HELP_PAYMENT发型师代购，BYPASS_FLOW分流活动
    	UNKNOWN("UNKNOWN","未知"),//未知；
    	PAYMENT("PAYMENT","支付活动"),
    	HELP_PAYMENT("HELP_PAYMENT","发型师代购"),
    	BYPASS_FLOW("BYPASS_FLOW","分流活动");
    	
		
		private String statusType;
		private String desc;
		
		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}
		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		
		private ActivityTypeEnum(String statusType, String desc) {
			this.statusType=statusType;
			this.desc = desc;
		}

		public static ActivityTypeEnum parse(String statusType) {
			if(StringUtils.isBlank(statusType)) {
				return UNKNOWN;
			}
			for (ActivityTypeEnum activityTypeEnum : values()) {
				if (statusType.equalsIgnoreCase(activityTypeEnum.getStatusType())) {
					return activityTypeEnum;
				}
			}
			return UNKNOWN;
		}
	}
	
	//和marketing项目对应
    public static enum PreferentialModeEnum {
    	//0 立减，1 折扣，2 特价
    	UNKNOWN("UNKNOWN","未知",-1),//未知；
    	REDUCE("REDUCE","立减",0),
    	DISCOUNT("DISCOUNT","折扣",1),
    	SPECIAL_OFFER("SPECIAL_OFFER","特价",2);
    	
		
		private String statusType;
		private String desc;
		private int code;
		
		public String getStatusType() {
			return statusType;
		}

		public void setStatusType(String statusType) {
			this.statusType = statusType;
		}
		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		public int getCode() {
			return code;
		}

		public void setCode(int code) {
			this.code = code;
		}
		
		private PreferentialModeEnum(String statusType, String desc,int code) {
			this.statusType=statusType;
			this.desc = desc;
			this.code = code;
		}

		public static PreferentialModeEnum parse(String statusType) {
			if(StringUtils.isBlank(statusType)) {
				return UNKNOWN;
			}
			for (PreferentialModeEnum preferentialModeEnum : values()) {
				if (statusType.equalsIgnoreCase(preferentialModeEnum.getStatusType())) {
					return preferentialModeEnum;
				}
			}
			return UNKNOWN;
		}
		public static PreferentialModeEnum parseStatus(int code) {
			for (PreferentialModeEnum preferentialModeEnum : values()) {
				if (code==preferentialModeEnum.getCode()) {
					return preferentialModeEnum;
				}
			}
			return UNKNOWN;
		}
	}
	
}